<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="include :: header"></head>
<body>
	<form class="layui-form" action="" lay-filter="chao_config-update-form" style="margin-top: 20px;">
		<input th:value="${session.formToken}" name="formToken" type="hidden" />
		<input name="id" th:value="${chaoConfig.id}"
			type="hidden">
		<!--  -->
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">名称：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="name"
					th:value="${chaoConfig.name}" name="name"
					placeholder="请输入名称">
			</div>
		</div>
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">值：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="val"
					th:value="${chaoConfig.val}" name="val"
					placeholder="请输入值">
			</div>
		</div>
 		<!--  -->
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">创建时间：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="createTime"
					th:value="${#dates.format(chaoConfig.createTime, 'yyyy-MM-dd HH:mm:ss')}"
					name="createTime" placeholder="请输入创建时间">
			</div>
		</div>
 		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" lay-filter="chao_config-update">立即提交</button>
			</div>
		</div>
	</form>
	<div th:include="include::footer"></div>
	<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
	<script>
		layui.use([ 'layer', 'jquery', 'form', 'laydate' ], function() {
			var $ = layui.jquery;
			var laydate = layui.laydate;
			var layer = layui.layer;
			var form = layui.form;

			//日期时间选择器
    			laydate.render({
				elem : '#createTime',
				type : 'datetime'
			});
 
			//监听提交
			form.on('submit(chao_config-update)', function(data) {
				//提交数据data.field
				ajaxPostLoad("/chao/config/update", data.field);
				return false;
			});
		});
	</script>
</body>
</html>